import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set_node_cls from "@dfeidao/atom-web/ui/set-node-cls";
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import set from '@dfeidao/atom-web/local/set';
import p001 from './p001';

export default async function a001(fd: IFeidaoAiBrowserComponent, data: string) {

	console.log("什么鬼=》", data);
	set(fd, 'data', data);
	// 查询联系人
	const res = await nodejs<{ res: Array<{}>; c: number; }>('customer-care/zj-000009/s001', { data });
	console.info(res);
	render(fd, res, p001, 'p001', 'inner');

	// 显示基本信息弹出框
	const d = fd.data.node.querySelector<HTMLDListElement>('[data-id="update1"]');
	set_node_cls(d, 'pos-a', false);

}
